package com.xpgk.mvc.btraining;

import com.jfinal.aop.Before;
import com.jfinal.plugin.activerecord.tx.Tx;
import com.xpgk.dto.RenderBean;
import com.xpgk.mvc.base.BaseController;

import com.xpgk.mvc.bpropaganda.PropgandaValidator;


public class BTrainingController extends  BaseController{
	

	public  void   index()
	{
		render("Btraining.html");
	}
	private BTrainingService btrainingService = new BTrainingService();
	@Before(TrainingValidator.class)
	public void saveTra(){
		//获取当前登录机构id
				String  cudid=getCUserOrganIds();
				
				BTraining bTraining = getModel(BTraining.class,"training");
				RenderBean result=btrainingService.saveTra(bTraining,cudid,getCUserIds());
				renderJson(result.getMap());
	}

}
